using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._ModelOnly
{
    /// <summary>
    /// <para>Parse Path</para>
    /// <para>Parses an input into its file name, extension, path, and the last workspace name. The output can be used as an inline variable in the output name of other tools.</para>
    /// <para>将输入分析为其文件名、扩展名、路径和最后一个工作区名称。输出可用作其他工具的输出名称中的内联变量。</para>
    /// </summary>    
    [DisplayName("Parse Path")]
    public class ParsePathExt : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ParsePathExt()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_data_element">
        /// <para>Input Values</para>
        /// <para>The input values to parse.</para>
        /// <para>要分析的输入值。</para>
        /// </param>
        public ParsePathExt(object _in_data_element)
        {
            this._in_data_element = _in_data_element;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "Parse Path";

        public override string CallName => "mb.ParsePathExt";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_data_element, _format.GetGPValue(), _path, _name, _extension_type, _workspace_name];

        /// <summary>
        /// <para>Input Values</para>
        /// <para>The input values to parse.</para>
        /// <para>要分析的输入值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Values")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_data_element { get; set; }


        /// <summary>
        /// <para>Format Name, Extension and Workspace</para>
        /// <para><xdoc>
        ///   <para>Removes all reserved characters. Given the input value of C:\1Tool Data\InputFC.shp:
        ///   <bulletList>
        ///     <bullet_item>Path—The output will be the file path, for example, C:\1Tool Data.  </bullet_item><para/>
        ///     <bullet_item>Name—The output will be the file name, for example, InputFC.  </bullet_item><para/>
        ///     <bullet_item>Extension—The output will be the file extension, for example, shp.  </bullet_item><para/>
        ///     <bullet_item>Workspace Name—The output will be the workspace name, for example, _1Tool_Data.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>删除所有保留字符。给定 C：\1Tool Data\InputFC.shp 的输入值：
        ///   <bulletList>
        ///     <bullet_item>路径 - 输出将是文件路径，例如 C：\1Tool Data。</bullet_item><para/>
        ///     <bullet_item>名称 - 输出将为文件名，例如 InputFC。</bullet_item><para/>
        ///     <bullet_item>扩展名 - 输出将是文件扩展名，例如 shp。</bullet_item><para/>
        ///     <bullet_item>工作空间名称 - 输出将为工作空间名称，例如 _1Tool_Data。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Format Name, Extension and Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _format_value _format { get; set; } = _format_value._false;

        public enum _format_value
        {
            /// <summary>
            /// <para>FORMAT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FORMAT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_FORMAT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_FORMAT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Path</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Path")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _path { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _name { get; set; }


        /// <summary>
        /// <para>Extension</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extension")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _extension_type { get; set; }


        /// <summary>
        /// <para>Workspace Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _workspace_name { get; set; }


        public ParsePathExt SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}